package com.ruoyi.source.controller;

import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.page.TableDataInfo;
import com.ruoyi.common.security.annotation.RequiresPermissions;
import com.ruoyi.source.api.domain.SrcBatchNum;
import com.ruoyi.source.domain.SrcStockRecords;
import com.ruoyi.source.domain.vo.SrcBatchNumVo;
import com.ruoyi.source.service.SrcStockRecordsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/stock")
public class SrcStockRecordsController extends BaseController {

    @Autowired
    private SrcStockRecordsService srcStockRecordsService;

    @GetMapping("/list")
    public TableDataInfo list(SrcStockRecords srcStockRecords) {
        startPage();
        List<SrcBatchNumVo> list = srcStockRecordsService.selectSrcBatchNumList(srcStockRecords);
        return getDataTable(list);
    }
}
